#CACHE{0}
<div id="formMap" name="formMap" style="width: 100%; height: 350px"></div>
<script type="text/javascript">

//<![CDATA[

var letraNH = String.fromCharCode(241);
var letraNHNH = String.fromCharCode(209);
var letraAacute = String.fromCharCode(225);
var letraAAacute = String.fromCharCode(193);
var letraEacute = String.fromCharCode(233);
var letraEEacute = String.fromCharCode(201);
var letraIacute = String.fromCharCode(237);
var letraIIacute = String.fromCharCode(205);
var letraOacute = String.fromCharCode(243);
var letraOOacute = String.fromCharCode(211);
var letraUacute = String.fromCharCode(250);
var letraUUacute = String.fromCharCode(218);

fecha = new Date();
if (GBrowserIsCompatible()) {
    // create the map
    var map = new GMap2(document.getElementById("formMap"));
    map.addControl(new GLargeMapControl());
    map.addControl(new GMapTypeControl());
    map.setCenter(new GLatLng([(#ENV**{lat,#CONFIG{gis_default_lat}})],[(#ENV**{lonx,#CONFIG{gis_default_lonx}})]), [(#CONFIG**{gis_default_zoom,0})], G_MAP_TYPE);

    // creamos el evento para crear nuevos marcadores
    GEvent.addListener(map, "click", function(overlay, point){
	map.clearOverlays();
	if (point) {
		map.addOverlay(new GMarker(point));
		map.panTo(point);
		document.forms.formulaire_editer_gis.lat.value = point.y;
		document.forms.formulaire_editer_gis.lonx.value = point.x;
	}
    });
	
	[(#ENV**{lat}|oui)
	map.addOverlay(new GMarker(new GLatLng([(#ENV**{lat})],[(#ENV**{lonx})])));
	map.setCenter(new GLatLng([(#ENV**{lat})],[(#ENV**{lonx})]));
	]
	
} else {
    alert("Sorry, the Google Maps API is not compatible with this browser");
}

//]]>

</script>


<div class="formulaire_spip formulaire_editer formulaire_editer_gis">
	<!-- br class='spacer' / -->
	[<p class="reponse_formulaire reponse_formulaire_ok">(#ENV*{message_ok})</p>]
	[<p class="reponse_formulaire reponse_formulaire_erreur">(#ENV*{message_erreur})</p>]
	[(#ENV{editable})
	<form method='post' action='#ENV{action}' enctype='multipart/form-data' name='formulaire_editer_gis' id='formulaire_editer_gis'><div>
		[(#REM) declarer les hidden qui declencheront le service du formulaire 
		parametre : url d'action ]
		#ACTION_FORMULAIRE{#ENV{action}}
		<ul>
			<li class="editer_lat obligatoire[ (#ENV**{erreurs}|table_valeur{lat}|oui)erreur]">
				<label for="lat">Latitude</label>
				<input type="text" name="lat" id="lat" class="text" value="[(#ENV**{lat})]" />
			</li>
			<li class="editer_lonx obligatoire[ (#ENV**{erreurs}|table_valeur{lonx}|oui)erreur]">
				<label for="lonx">Longitude</label>
				<input type="text" name="lonx" id="lonx" class="text" value="[(#ENV**{lonx})]" />
			</li>	
		</ul>
		[(#REM) ajouter les saisies supplementaires : extra et autre, a cet endroit ]
		<!--extra-->
		<p class='boutons'><input class='submit' type='submit' value='<:bouton_enregistrer:>' /></p>
	</div></form>
	]
</div>
